package com.test.solrjDemo;

import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;

/**
 * ${DESCRIPTION}
 *
 * @author muxiaoyu
 * @create 2017/06/28 13:22
 **/
public class SolrjDemo {
    public static void main(String[] args) throws SolrServerException {
        HttpSolrServer httpSolrServer = new HttpSolrServer("http://172.16.4.207:8983/solr");
        SolrQuery solrQuery = new SolrQuery("userName:lu");
        QueryResponse query = httpSolrServer.query(solrQuery);
        System.out.println(query);
    }
}
